package controller

import (
	"github.com/gin-gonic/gin"
	"my-job/web/service"
)

type MatterController struct {
	Controller
}
// Add godoc
// @Summary Add a matter
// @Accept json
// @Produce json
// @Param title formData string true "Title"
// @Param start_at formData int true "Start at"
// @Param end_at formData int true "End at"
// @Success 200
// @Failure 403
// @Router /matter [post]
func (m *MatterController) Add (ctx *gin.Context) {
	ctx.JSON(200, nil)
	return
}

type MatterResponse struct {
	Data service.Matter `json:"data"`
}

// Add godoc
// @Summary Get a matter by Id
// @Accept json
// @Produce json
// @Param id path int true "Matter id"
// @Success 200 {object} MatterResponse "事项"
// @Failure 404
// @Router /matter/{id} [get]
func (m *MatterController) Get (ctx *gin.Context) {
	ctx.JSON(200, nil)
	return
}

// Add godoc
// @Summary Delete a matter by Id
// @Accept json
// @Produce json
// @Param id path int true "Matter id"
// @Success 200
// @Failure 404
// @Router /matter/{id} [delete]
func (m *MatterController) Delete (ctx *gin.Context){
	ctx.JSON(200, nil)
	return
}

// Add godoc
// @Summary Modify a matter by Id
// @Accept json
// @Produce json
// @Param id path int true "Matter id"
// @Param title formData string true "Title"
// @Param start_at formData int true "Start at"
// @Param end_at formData int true "End at"
// @Success 200 {object} MatterResponse "事项"
// @Failure 404
// @Router /matter/{id} [put]
func (m *MatterController) Modify (ctx *gin.Context) {
	ctx.JSON(200, nil)
	return
}

// Add godoc
// @Summary Finish a matter by Id
// @Accept json
// @Produce json
// @Param id path int true "Matter id"
// @Param finished formData int true "Finish state"
// @Success 200 {object} MatterResponse "事项"
// @Failure 404
// @Router /matter/{id} [put]
func (m *MatterController) Finish (ctx *gin.Context){
	ctx.JSON(200, nil)
	return
}

type MatterListDataResponse struct {
	List []service.Matter `json:"list"`
	Size int `json:"size"`
	Page int `json:"page"`
	Total int `json:"total"`
}

type MatterListResponse struct {
	Data MatterListDataResponse `json:"data"`
}

// Add godoc
// @Summary Finish a matter by Id
// @Accept json
// @Produce json
// @Param page query int false "Page"
// @Param size query int false "Page size."
// @Success 200 {object} MatterListResponse "事项列表"
// @Failure 404
// @Router /matter/{id} [put]
func (m *MatterController) GetList (ctx *gin.Context){
	ctx.JSON(200, nil)
	return
}

// Add godoc
// @Summary Add a matter tags by Id
// @Accept json
// @Produce json
// @Param id path int true "Matter id"
// @Param tag_ids body []int true "Tag ids"
// @Success 200 {object} MatterListResponse "事项列表"
// @Failure 404
// @Router /matter/{id}/tags [put]
func (m *MatterController) AddTag(ctx *gin.Context) {
	ctx.JSON(200, nil)
	return
}